import axios from 'axios'
// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
axios.defaults.headers.post['Content-Type'] = 'application/json'

// 通用方法
export const POST = (url, params) => {
  return axios.post(`${url}`, params)
    .then(res => res.data)
}
export const GET = (url, params) => {
  return axios.get(`${url}`, {
    params: params
  }).then(res => res.data)
}
export const PUT = (url, params) => {
  return axios.put(`${url}`, params).then(res => res.data)
}
